import { BrowseIcon, LogoutIcon } from 'tdesign-icons-vue-next';
import { shallowRef } from 'vue';

import Layout from '@/layouts/index.vue';

export default [
  {
    path: '/user',
    name: 'user',
    component: Layout,
    redirect: '/user/index',
    meta: {
      hidden: false,
      title: { zh_CN: '个人中心', en_US: 'User Center' },
      icon: shallowRef(BrowseIcon),
      orderNo: 999,
    },
    children: [
      {
        path: 'message',
        name: 'MessageList',
        meta: { hidden: false, title: { zh_CN: '消息列表', en_US: 'Message List' }, icon: 'system-messages' },
        component: () => import('@/pages/message/index.vue'),
      },
      {
        path: 'profile',
        name: 'userProfile',
        component: () => import('@/pages/user/profile/index.vue'),
        meta: { hidden: false, title: { zh_CN: '个人中心', en_US: 'User Center' }, icon: 'user-circle' },
      },
    ],
  },
  {
    path: '/loginRedirect',
    name: 'loginRedirect',
    redirect: '/login',
    meta: { hidden: true, title: { zh_CN: '登录页', en_US: 'Login' }, icon: shallowRef(LogoutIcon) },
    component: () => import('@/layouts/blank.vue'),
    children: [
      {
        path: 'index',
        redirect: '/login',
        component: () => import('@/layouts/blank.vue'),
        meta: { title: { zh_CN: '登录页', en_US: 'Login' } },
      },
    ],
  },
];
